home *** CD-ROM | disk | FTP | other *** search
- property stimList : {"%", "$", "@", "?", "&", "^", ">", "<", "("} --the list of mask characters
-
- set listHandler to load script ""
- to createMaskStimuli(howmany) --returns a list of mask words
- set maskListOut to {} --will contain a list of mask strings
- set theMaskCharacters to sample(howmany, stimList, false) of listHandler --grab 7 unique mask characters
- repeat with aMaskCharacter in theMaskCharacters --pad each mask character out to a length between 3 and 7 repeats
- set theMaskString to ""
- repeat with n from 1 to (random number from 3 to 7)
- set theMaskString to theMaskString & aMaskCharacter
- end repeat
- set end of maskListOut to ("'" & theMaskString & "'") --single quotes so it is not interpreted as an instruction
- end repeat
- return maskListOut
- end createMaskStimuli
-
- to packMaskLengthToPreceedingWord(WordStimuli, wordIndex, maskList, maskIndex)
- set minlength to count of characters of item wordIndex of WordStimuli
- set theCharString to text 2 through -2 of item maskIndex of maskList --step over quote
- set maskLength to count of theCharString
- if maskLength < minlength then
- set theMaskCharacter to character 1 of theCharString
- repeat with n from 1 to (minlength - maskLength)
- set theCharString to theCharString & theMaskCharacter
- end repeat
- end if
- set item maskIndex of maskList to "'" & theCharString & "'"
- return maskList
- end packMaskLengthToPreceedingWord
-